Repository navigation
Revert SQL Server Application Name injection - #39700
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are present, and the changes include regression coverage for connection-string behavior and telemetry registration.
No open issues 🎉
What changed in this PR
This pull request reverts SQL Server connection-string Application Name rewriting while preserving EF Core telemetry through RegisteredApplication.EntityFrameworkCore on EF-created connections.
Changes:
- Removes connection-string rewriting, its cache, and obsolete implementation members.
- Restores exact master-connection string behavior and two-database interceptor coverage.
- Adds regression coverage for absent, empty, default, and custom application names during construction and reassignment.
| File | Description |
|---|---|
| test/EFCore.SqlServer.Tests/Storage/Internal/SqlServerConnectionTest.cs | Adds regression tests verifying unchanged connection strings, master-connection behavior, and telemetry registration across application-name scenarios. |
| test/EFCore.SqlServer.FunctionalTests/TwoDatabasesSqlServerTest.cs | Restores SQL Server interceptor coverage and removes the dummy Application Name workaround. |
| src/EFCore.SqlServer/Storage/Internal/SqlServerConnection.cs | Removes SQL Server connection-string Application Name injection and its rewrite cache while preserving EF Core telemetry registration. |
Review effort: Lite
Code coverage overviewLanguages: C# C# / code-coverage
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
AndriySvyryd
approved these changes
Nov 17, 2026
- Preserve connection strings without injecting EF Core version and platform details. - Restore interceptor coverage and retain registered-application telemetry from the parent layer. Reverts #36548 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
cheenamalhotra
force-pushed
the
dev/cheena/revert-application-name-injection
branch
from
November 17, 2026 21:57
1190ff1 to
4303bd8
Compare
AndriySvyryd
approved these changes
Nov 17, 2026
AndriySvyryd
deleted the
dev/cheena/revert-application-name-injection
branch
November 17, 2026 22:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #36548, adapted for intervening changes. Stacked on #39698; review this layer against
dev/cheena/sql-connection-telemetry.Removes connection-string Application Name injection and its rewrite cache. Restores exact master-connection string assertions, removes the two-database interceptor skip, and removes the dummy Application Name workaround. Regression coverage verifies unchanged connection strings for absent, empty, SqlClient-default, and custom application names, both on construction and reassignment.
Preserves the parent's
RegisteredApplication.EntityFrameworkCoretelemetry for EF-created runtime, master, and scaffolding connections, without changing user-supplied connections. Only internal implementation members are removed; there are no public API baseline changes.Validation (Windows, repository-pinned .NET 12 SDK; native MTP command mode):
.\restore.cmd— passed.. .\activate.ps1; dotnet test --project .\test\EFCore.SqlServer.Tests\EFCore.SqlServer.Tests.csproj --filter-class '*SqlServerConnectionTest' --verbosity quiet— passed: 11 succeeded, 0 failed, 0 skipped. Before the implementation change, this same command reproduced 5 assertion failures (3 application-name cases and 2 master-connection cases).. .\activate.ps1; dotnet test --project .\test\EFCore.SqlServer.FunctionalTests\EFCore.SqlServer.FunctionalTests.csproj --filter-class '*TwoDatabasesSqlServerTest' --verbosity quiet— passed against LocalDB: 4 succeeded, 0 failed, 0 skipped, including restored interceptor coverage.git --no-pager diff --check— passed.The full suite was not run; the build/tests checklist remains unchecked pending CI. No blockers.